package com.zjitc.mapper;

import com.zjitc.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Create By IntelliJ IDEA
 *
 * @author: myq
 * @create-Time: 2017/11/14  16:04
 */
@Component
public interface CategoryMapper {
  /**
   * 查看所有商品分类
   * @return
   */
  List<Category> findAll();

  /**
   * 查看某一商品分类
   * @param cid
   * @return
   */
  Category findbycid(@Param("cid") String cid);

  /**
   * 添加商品分类
   * @return
   */
  int add(Category category);

  /**
   * 更新商品分类
   */
  int update(Category category);

  /**
   * 删除商品分类
   * @param cid
   */
  int deletebycid(@Param("cid") String cid);
}
